package com.cong._55;

class Solution {
    public boolean canJump(int[] nums) {
        if(nums.length == 1) {
            return true;
        }

        int farestCapable = nums.length - 1;
        for(int i = nums.length - 2;i >=0;i--) {
            if (nums[i] >= farestCapable - i) {
                farestCapable = i;
            }
        }
        return farestCapable == 0;
    }
}